lib/repo: Add API to create and list ref aliases
authorColin Walters <walters@verbum.org>
Fri, 28 Jul 2017 01:22:48 +0000 (21:22 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 2 Aug 2017 17:33:10 +0000 (17:33 +0000)
commitd5273b34d0b4359aa668563528644061025e7ab1
tree2c479c079789cc85d7268c431f3b80f331d1dec7
parentd1eb909cd0a45246095d71f077c7e4cd4b5646fe
lib/repo: Add API to create and list ref aliases

There are multiple use cases where we'd like to alias refs.

First, having a "stable" alias which gets swapped across major
versions: https://pagure.io/atomic-wg/issue/228

Another case is when a ref is obsoleted;
<https://pagure.io/atomic-wg/issue/303>
This second one could be done with endoflife rebase, but I think
this case is better on the server side, as we might later change
our minds and do actual releases there.

I initially just added some test cases for symlinks in the `refs/heads` dir to
ensure this actually works (and it did), but I think it's worth having APIs.

Closes: #1033
Approved by: jlebon
apidoc/ostree-sections.txt
src/libostree/libostree-devel.sym
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo-refs.c
src/libostree/ostree-repo.h
src/ostree/ot-builtin-refs.c
tests/test-refs.sh